// 路由页面
//  导入
import Vue from 'vue'
import VueRouter from 'vue-router'
//  import Home from '../views/Home.vue'
import Login from '../components/Login.vue'
import Home from '../components/Home.vue'



Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: '/login'    //重定向
  },
  {
    path: '/login',     //登录页
    component: Login
  },
  {
    path:"/home",
    component: Home
  }
]

// new一个路由对象
const router = new VueRouter({
  routes
})

//  导出模块
export default router
